﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq;
using condortravel.operaciones.core.DataModel;

namespace condortravel.operaciones.persistence
{
    public class DataContextFactory
    {
        public static Object objetoBloqueo = new object();
        public static DataContext getDataContextInstance(DataContext dataContext)
        {
            lock (objetoBloqueo)
                {
                    DataContext ret = null;
                    if (dataContext is BDOperacionesDataContext)
                    {
                        ret = new BDOperacionesDataContext();
                        BDOperacionesDataContext x = new BDOperacionesDataContext();

                        ret.Connection.ConnectionString = dataContext.Connection.ConnectionString;

                    }
                    return ret;
                }            
        }
    }
}
